<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php
	$edit		= JRequest::getVar('edit',true);
	$text = !$edit ? JText::_( 'Tạo mới' ) : JText::_( 'Sửa' );
	JToolBarHelper::title(   JText::_( 'Banner' ).': <small><small>[ ' . $text.' ]</small></small>' );
	JToolBarHelper::save();
	if (!$edit)  {
		JToolBarHelper::cancel();
	} else {		
		JToolBarHelper::cancel( 'Thoát', 'Đóng' );
	}	
	$editor =& JFactory::getEditor();
?>
<form action="index.php" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data">
<div class="col width-10">
<fieldset class="adminform">
    <legend><?php echo JText::_( 'Chi tiết' ); ?></legend>
    <table class="admintable">
    <tr>
        <td width="100" align="right" class="key">
            <label for="title">
                <?php echo JText::_( 'Name' ); ?>:
            </label>
        </td>
        <td>
            <input class="text_area" type="text" name="name" id="name" size="60" maxlength="250" value="<?php echo $this->detail->name;?>" />
        </td>
    </tr>
    <tr>
        <td width="100" align="right" class="key">
            <label for="title">
                <?php echo JText::_( 'Hình ảnh' ); ?>:
            </label>
        </td>
        <td>
        	<?php if($this->detail->image){?>
            <img src="../uploads/image/<?php echo $this->detail->image;?>" alt="<?php echo $this->detail->image;?>" width="100"/><br />
            <?php }?>
            <input class="text_area" type="file" name="image" id="image" size="80" maxlength="250" />
        </td>
    </tr> 
    <tr>
        <td valign="top" align="right" class="key">
            <?php echo JText::_( 'Link' ); ?>:
        </td>
        <td>
            <input class="text_area" type="text" name="link" id="link" size="60" maxlength="250" value="<?php echo $this->detail->link;?>" />
        </td>
	</tr>
    <tr>
        <td valign="top" align="right" class="key">
            <?php echo JText::_( 'Position' ); ?>:
        </td>
        <td>
          <?php echo $this->lists['position']; ?>
        </td>
	</tr>   
    <tr>
        <td valign="top" align="right" class="key">
            <?php echo JText::_( 'Published' ); ?>:
        </td>
        <td>
            <?php echo $this->lists['published']; ?>
        </td>
	</tr>
    </table>
</fieldset>
</div>
<input type="hidden" name="oldimage" value="<?php echo $this->detail->image;?>"  />
<input type="hidden" name="option" value="com_logo" />
<input type="hidden" name="cid[]" value="<?php echo $this->detail->id; ?>" />
<input type="hidden" name="task" value="" />
</form>